/*
 * @Author: 贺永胜
 * @Date: 2021-04-19 14:07:25
 * @email: 1378431028@qq.com
 * @LastEditors: 贺永胜
 * @LastEditTime: 2022-06-23 18:27:28
 * @Description: neDb配置文件
 */
import Vue from 'vue'
import Datastore from 'nedb-promises'
const { app } = require('@electron/remote')

const basePath = app.getPath('userData')

console.log('basePath')
console.log(basePath)
const db = {
  todoItem: new Datastore({
    autoload: true,
    filename: basePath + '/nedb/todo-item'
  })
}

Vue.prototype.$db = db
